toRGB

open fun toRGB(colorvalue: Array<Float>): Array<Float>

Transforms a color value assumed to be in this ColorSpace into a value in the default CS_sRGB color space.

This method transforms color values using algorithms designed to produce the best perceptual match between input and output colors. In order to do colorimetric conversion of color values, you should use the toCIEXYZ method of this color space to first convert from the input color space to the CS_CIEXYZ color space, and then use the fromCIEXYZ method of the CS_sRGB color space to convert from CS_CIEXYZ to the output color space. See toCIEXYZ and fromCIEXYZ for further information.

Return

a float array of length 3

Parameters

colorvalue

a float array with length of at least the number of components in this ColorSpace

Throws

if array length is not at least the number of components in this ColorSpace